package com.mk.admin.controller;

import com.mk.admin.model.ResultDto;
import com.mk.admin.model.vo.MessageRecordVo;
import com.mk.admin.service.MessageRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/a/adm/messageRecord")
@Api(tags = "消息内容")
public class MessageRecordController extends BaseController<MessageRecordVo> {
    @Autowired
    private MessageRecordService msgService;

    @PostMapping("/select")
    @Override
    @ApiOperation(value = "获取消息内容", tags = "消息", notes = "获取消息内容")
    public ResultDto select(@RequestBody MessageRecordVo vo) {
        return  msgService.getMsgByid(vo);
    }

    @PostMapping("/add")
    @Override
    @ApiOperation(value = "新增消息内容", tags = "消息", notes = "新增消息内容")
    public ResultDto add(@RequestBody MessageRecordVo vo) {
        return msgService.add(vo);
    }

}
